#include<iostream>
#include<unistd.h>
using namespace std;

int global_val=0;

int main()
{
    pid_t pid=fork();
    if(pid==0)
    {
        cout<<"Child process started with PID"<<getpid()<<" "<<"PPID:"<<getppid()<<endl;
        return 0;
    }
    else if(pid<0)
    {
        cerr<<"Fork failed"<<endl;
        return 1;
    }
    else
    {
        cout<<"Parent process started with PID"<<getpid()<<" "<<"PPID:"<<getppid()<<endl;
    }
    return 0;
}